package org.istt.domain;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * ProcessStatus entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TBL_VALIDATOR_TYPE", schema = "dbo", catalog = "onegate")
public class ValidatorType extends BaseObject<Long> implements
		java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2505970484947337329L;
	// Fields

	private Long id;
	private String name;
	
	// Constructors

	/** default constructor */
	public ValidatorType() {
	}

	/** full constructor */

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name="NAME")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean equals(Object o) {
		if (this == o) return true;
		if (!(o instanceof FieldType)) return false;

		final FieldType ps = (FieldType) o;
        if (!getName().equals(ps.getName())) return false;

		return true;
	}

	public int hashCode() {
		int result;
		result = name.hashCode();
		result = 29 * result;
		return result;
	}

	@Override
	public String toString() {
		return new StringBuilder("id = ").append(id)
					.append(", name = ").append(name)
					.toString();
	}

}